package org.bitterorange.flansmodslain.models;

import org.bukkit.Material;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

public class PlayerSlainEvent extends Event {
    private static final HandlerList Handlers = new HandlerList();
    private final SlayType Type;
    private final Player PlayerKiller;
    private final Player PlayerKilled;
    private final String vehicle;
    private final boolean IsHeadShot;
    private final boolean isVehicleKill;
    private final Material originalMaterial;
    private final boolean isKilledAI;
    private final boolean isKillerAI;
    public EntitySoldierWrapper killerAI;
    public EntitySoldierWrapper killedAI;

    public PlayerSlainEvent(Player playerKiller, Player playerKilled, SlayType type, String vehicle,
                            boolean isHeadShot, boolean isVehicleKill, Material originalMaterial,
                            boolean isKilledAI, boolean isKillerAI
    ) {
        Type = type;
        PlayerKiller = playerKiller;
        PlayerKilled = playerKilled;
        this.vehicle = vehicle;
        IsHeadShot = isHeadShot;
        this.isVehicleKill = isVehicleKill;
        this.originalMaterial = originalMaterial;
        this.isKilledAI = isKilledAI;
        this.isKillerAI = isKillerAI;
    }

    public static HandlerList getHandlerList() {
        return Handlers;
    }

    @Override
    public HandlerList getHandlers() {
        return Handlers;
    }

    public Player getPlayerKiller() {
        return PlayerKiller;
    }

    public Player getPlayerKilled() {
        return PlayerKilled;
    }

    public SlayType getType() {
        return Type;
    }

    public String getVehicle() {
        return vehicle;
    }

    public boolean isHeadShot() {
        return IsHeadShot;
    }

    public boolean isVehicleKill() {
        return isVehicleKill;
    }

    public Material getOriginalMaterial() {
        return originalMaterial;
    }

    public boolean isKilledAI() {
        return isKilledAI;
    }

    public boolean isKillerAI() {
        return isKillerAI;
    }

    public EntitySoldierWrapper getKillerAI() {
        return killerAI;
    }

    public PlayerSlainEvent setKillerAI(EntitySoldierWrapper killerAI) {
        this.killerAI = killerAI;
        return this;
    }

    public EntitySoldierWrapper getKilledAI() {
        return killedAI;
    }

    public PlayerSlainEvent setKilledAI(EntitySoldierWrapper killedAI) {
        this.killedAI = killedAI;
        return this;
    }

    @Override
    public String toString() {
        return "PlayerSlainEvent{" +
                "Type=" + Type +
                ", PlayerKiller=" + PlayerKiller +
                ", PlayerKilled=" + PlayerKilled +
                ", vehicle='" + vehicle + '\'' +
                ", IsHeadShot=" + IsHeadShot +
                ", isVehicleKill=" + isVehicleKill +
                ", originalMaterial=" + originalMaterial +
                ", isKilledAI=" + isKilledAI +
                ", isKillerAI=" + isKillerAI +
                ", killerAI=" + killerAI +
                ", killedAI=" + killedAI +
                '}';
    }
}
